package com.fas.system.mapper;

import com.fas.system.domain.FasFacilities;
import com.fas.system.domain.FasInspectionLine;
import com.fas.system.domain.vo.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface FasInspectionLineMapper {

    List<FasInspectionLine> queryAll(FasInspectionLine fasInspectionLine);

    FasInspectionLine findById(Long id);

    int insertFasInspectionLine(FasInspectionLine fasInspectionLine);

    int updateFasInspectionLine(FasInspectionLine fasInspectionLine);

    int deleteFasInspectionLine(@Param("ids") Long[] ids);

    List<FasFacilitiesInspection> findFacility(FasFacilitiesInspection fasFacilitiesInspection);

    int selectGroupNum(Integer selectGroupNum);

    /**
     * 查询巡检计划为空的数据
     * @return
     */
    List<FasInspectionLine> selectNullLine(@Param("deptId")Long deptId,@Param("cooperationCompanyId")Integer cooperationCompanyId);

    /**
     * 通过id更新巡检路线的巡检计划字段
     * @param lineId
     * @return
     */
    int updatePlanByLineId(@Param("id") Long lineId,@Param("planId") Integer planId);

    int updatePlanByLineIds(@Param("planIds")Integer[] planIds);

    /**
     * 通过用户id查询线路
     * @param userId
     * @return
     */
    List<IpqcInspectionLine> selectByUserId(@Param("userId") Integer userId, @Param("deptId") Integer deptId,
                                            @Param("lineStatus")Integer lineStatus);

    List<IpqcLineBuilding> miniappIpqcLineBuilding(@Param("taskId")Long taskId);

    /**
     * 已弃用
     * @param lineStatus
     * @return
     */
    List<IpqcCenterLineVO> getLineList(Integer lineStatus);

    List<IpqcCenterAlarmVo> getAlarmList(@Param("lineStatus") Integer lineStatus,@Param("userId")Long userId);

    List<IpqcLineBuildingFacilityVo> miniappIpqcLineBuildingFacility(@Param("taskId") Long taskId,@Param("buildingName")String buildingName);

    Integer existsInspectionPlan(Long id);

    List<FasFacilities> searchFacilityListV2(InspectionLineBuildingFacilityVo inspectionLineBuildingFacilityVo);

}
